<h2 class="headlinesec"><?php _e('Comments:'); ?></h2>

<?php // Do not delete these lines
	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!');
	if (!empty($post->post_password)) { // if there's a password
		if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
		?>
		<h2><?php _e('Password Protected'); ?></h2>
		<p><?php _e('Enter the password to view comments.'); ?></p>

		<?php return;
	}
}
/* This variable is for alternating comment background */
$oddcomment = 'alt';
?>

<!-- You can start editing here. -->
<?php if ($comments) : ?>
	<ol class="commentlist">
		<?php foreach ($comments as $comment) : ?>

		<li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">

			<div class="commentmetadata">
				<p><?php comment_author_link() ?><?php _e(' Said&#58;'); ?></p>		
 			</div>
			<div class="commenttext">			
				<?php if ($comment->comment_approved == '0') : ?>
					<p><i><?php _e('Your comment is awaiting moderation.'); ?></i></p>
 				<?php else: ?>
					<?php comment_text() ?>
				<?php endif; ?>  
			</div>
		</li>

		<?php /* Changes every other comment to a different class */
			if ('alt' == $oddcomment) $oddcomment = '';
			else $oddcomment = 'alt';
		?>

		<?php endforeach; /* end for each comment */ ?>
	</ol>

<?php else : // this is displayed if there are no comments so far ?>

<?php if ('open' == $post->comment_status) : ?>
	<!-- If comments are open, but there are no comments. -->
		<h3><?php _e('Maaan... come on say something'); ?></h3>
	<?php else : // comments are closed ?>
		<!-- If comments are closed. -->
		<p class="nocomments">Comments are closed.</p>
	<?php endif; ?>
<?php endif; ?>


<?php if ('open' == $post->comment_status) : ?>
	<br/>
	<h2 class="headlinesec" id="respond">Say Something:</h2>

	<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
		<p>
        	You must be 
            <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> 
        	to post a comment.
		</p>

	<?php else : ?>

		<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
	
		<?php if ( $user_ID ) : ?>
			<label class="commentlabel" for="userid">Logged in as <?php echo $user_identity; ?></label>  
       
		<?php else : ?>
		
			<label class="commentlabel" for="author">Name <?php if ($req) echo "(required)"; ?></label>           	 	
			<input type="text" name="author" class="commentsmallinput" id="commentsauthor" value="<?php echo $comment_author; ?>" tabindex="1" />
			
			<label class="commentlabel" for="email">Mail (will not be published) <?php if ($req) echo "(required)"; ?></label>
    		<input type="text" name="email" class="commentsmallinput" id="commentsemail" value="<?php echo $comment_author_email; ?>" tabindex="2" />
			
			<label class="commentlabel" for="url">Website</label>
			<input type="text" name="url" class="commentsmallinput" id="commentsurl" value="<?php echo $comment_author_url; ?>" tabindex="3" />
			

		<?php endif; ?>
		
        <textarea name="comment" id="commentinput" cols="60" rows="10" tabindex="4"></textarea>
		
		<input name="submit" type="submit" id="commentssubmit" class"button" tabindex="5" value="Submit Comment" />
		<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
		
		<?php do_action('comment_form', $post->ID); ?>

		</form>

	<?php endif; // If registration required and not logged in ?>

<?php endif; // if you delete this the sky will fall on your head ?>